import type { SearchParams, SearchResult, SearchTipsResult } from '@/types/search'
import { request } from '@/utils/request'
/**
 * 搜索-商品搜索-带筛选条件
 * @returns
 */
export const postSearchAPI = (data?: SearchParams) => {
  return request<SearchResult>({
    method: 'POST',
    url: '/search/all',
    data,
  })
}
/**
 * 搜索-提示语
 * @param
 * @returns
 */
export const getSearchTipsAPI = (keyword: string) => {
  return request<SearchTipsResult>({
    method: 'GET',
    url: `/search/tips?keyword=${keyword}`,
  })
}
